<script src="http://www.wowhead.com/widgets/power.js"></script>
<?php
include 'include.php';
	mysql_connect(DB_HOST,DB_USER,DB_PASSWORD) or die(mysql_error());
	mysql_select_db(DB_NAME);

$sql = "SELECT * from loots ORDER BY loots_date";
$result = mysql_query($sql);
while($myrow = mysql_fetch_row($result)) {
	$item_data = get_item_data($myrow[3]);
	$item_id = $item_data[0];
	$item_name = $item_data[1];
	$player_name = get_player_name($myrow[1]);
	$loot_date = $myrow[2];
	$npc_id = $item_data[2];
	$npc_name = $item_data[3];
	$zone_name = $item_data[4];
	echo date("M j Y h:i:s A",$loot_date) . ": " . $player_name . " <a href=\"http://www.wowhead.com/?item=" . $item_id . "\">" . $item_name . "</a> <a href=\"http://www.wowhead.com?npc=" . $npc_id . "\">" . $npc_name . "</a> ";
	if($myrow[4] == 0) {
		echo "Normal Pick | <a href=\"mark_rot.php?loots_id=" . $myrow[0] . "\">Mark as Rot</a>";
	}
	else {
		echo "Rot Pick | <a href=\"mark_normal.php?loots_id=" . $myrow[0] . "\">Mark as Normal</a>";
	}
	echo "<br>\n";
}

?>

	
	